package com.bdd.controller;

import com.bdd.common.AjaxResponseResult;
import com.bdd.dto.ContactDto;
import com.bdd.service.ContactService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author Bdd
 * @Description
 * @Date 2020/4/2 3:40
 */
@RestController
@RequestMapping("contact")
public class ContactController {

    @Resource
    private ContactService contactService;

    @PostMapping("save")
    public AjaxResponseResult save(@RequestBody ContactDto contactDto){
        return contactService.save(contactDto);
    }
}
